<?php
ob_start();

//ini_set("session.auto_start","true");
//ini_set("register_globals", "true");
    if (!session_id())
        session_start();
//echo "is login : " . $_SESSION['islogin'];
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <?php

        if (!isset($_SESSION['islogin']))
            $_SESSION['islogin'] = 0;

        $isLogin = $_SESSION['islogin'] == 1 ? 'true' : 'false';


        if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 1800)) {
            header("location:logout.php");
        }
        $_SESSION['LAST_ACTIVITY'] = time();
        
        ?>

        <meta charset="utf-8" />
        <title>ADMIN AREA</title>
        <link href="css/menu.css" rel="stylesheet" type="text/css" charset="utf-8" />
        <link href="css/style.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <div id='cssmenu'>
            <ul>
                <li class='active '>
                    <a href='index.php'><span>Home</span></a>
                </li>
                <li class='has-sub '>
                    <a href='#'><span>Master</span></a>
                    <ul>
                        <li><a onclick="return <?php echo $isLogin; ?>;" href="company_editor.php"><span>Company Information</span></a></li>
                        <li><a onclick="return <?php echo $isLogin; ?>;" href="editor_form.php?t=12"><span>Branch Addresses</span></a></li>
                        <li><a onclick="return <?php echo $isLogin; ?>;" href="editor_homepics.php"><span>Frontpage Images</span></a></li>
                        <li><a onclick="return <?php echo $isLogin; ?>;" href="editor_form.php?t=1"><span>City</span></a></li>
                        <li><a onclick="return <?php echo $isLogin; ?>;" href="editor_form.php?t=11"><span>Embassy</span></a></li>
                        <li><a onclick="return <?php echo $isLogin; ?>;" href="editor_form.php?t=2"><span>Partners</span></a></li>
                        <li><a onclick="return <?php echo $isLogin; ?>;" href="editor_form.php?t=3"><span>Packages</span></a></li>
                        <li><a onclick="return <?php echo $isLogin; ?>;" href="aboutus_editor.php"><span>About Us</span></a></li>
                        <li><a onclick="return <?php echo $isLogin; ?>;" href="editor_form.php?t=8"><span>Users</span></a></li>
                        <li><a onclick="return <?php echo $isLogin; ?>;" href="editor_form.php?t=10"><span>Package Category</span></a></li>

                    </ul>
                </li>
                <li class='has-sub '><a href='#'><span>Inquiries</span></a>
                    <ul>
                        <li><a onclick="return <?php echo $isLogin; ?>;" href="editor_form.php?t=5"><span>Contact Us</span></a></li>
                        <li><a onclick="return <?php echo $isLogin; ?>;" href="editor_form.php?t=9"><span>Partner Contact</span></a></li>
                    </ul>
                </li>
                <?php if ($isLogin == "true") { ?>
                    <li><a href='logout.php'><span>Logout</span></a></li>
                <?php } ?>
            </ul>
        </div>
        <div style="clear:both; margin: 0;">&nbsp;</div>
		
		<?php ob_end_flush(); ?>

    </body>
</html>